$def with (mb, selected="books")

$ url_prefix = "/people/" + mb.username
$ readlog_url = url_prefix + "/books/%s/"
$ options = [(_("Books"), url_prefix + "/books")]
$if mb.is_my_page or mb.is_public:
  $ options += [
  $   (_("Want to Read (%(count)d)", count=mb.counts['want-to-read']), readlog_url % "want-to-read"),
  $   (_("Currently Reading (%(count)d)", count=mb.counts['currently-reading']), readlog_url % "currently-reading"),
  $   (_("Already Read (%(count)d)", count=mb.counts['already-read']), readlog_url % "already-read"),
  $   (_("My Feed"), readlog_url % "feed"),
$ ]
$ options += [
  $   (_("Lists (%(count)d)", count=len(mb.lists)) , url_prefix + "/lists"),
  $   (_("Followers"), url_prefix + "/followers"),
  $   (_("Following"), url_prefix + "/following"),
$ ]
$if mb.is_my_page:
  $ options += [
  $   (_("Loans"), "/account/loans"),
  $   (_("Loan History"), "/account/loan-history"),
  $   (_("Notes"), url_prefix + "/books/notes"),
  $   (_("Reviews"), url_prefix + "/books/observations"),
  $   (_("Imports and Exports"), "/account/import")
  $ ]
$:render_template("books/breadcrumb_select", selected, options)

